package com.huaxia.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author wangli 爱我华夏，爱我中华！
 * @date 2021/03/15 14:11
 */
@Configuration
public class WebConfiger implements WebMvcConfigurer {

    @Autowired
    LoginManageInterceptor loginManageInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(loginManageInterceptor)
                .addPathPatterns("/pv/*")
                .addPathPatterns("/FHS/*")
                .addPathPatterns("/attend/*")
                .addPathPatterns("/deptLevels/*")
                .addPathPatterns("/excellent/*")
                .addPathPatterns("/goOn/*")
                .addPathPatterns("/newAdd/*")
                .addPathPatterns("/performance/*")
                .addPathPatterns("/product/*")
                .addPathPatterns("/promotion/*")
                .addPathPatterns("/realAct/*")
                .addPathPatterns("/navigation/*")
                .excludePathPatterns("/schtml/portal/navigation.html")
                .excludePathPatterns("/schtml/portal/navigationYX.html");

    }



}
